class NetList<T>

Summary

A networkable list for use with the <see cref="T:Sandbox.SyncAttribute" /> and <see cref="T:Sandbox.HostSyncAttribute" />. Only changes will be networked instead of sending the whole list every time, so it's more efficient. <br /><para><b>Example usage:</b><code> public class MyComponent : Component { [Sync] public NetList&lt;int&gt; MyIntegerList { get; set; } = new(); <br /> public void AddNumber( int number ) { if ( IsProxy ) return; MyIntegerList.Add( number ); } } </code></para>

User Comments